<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>文献资源管理系统-系统管理</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="文献资源管理系统-系统管理">
<meta name="description" content="文献资源管理系统-系统管理">
<meta name="author" content="yinqi">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
</head>
  <style>
    .col-lg-12{
      margin: auto;
    top: 17px;
    left: 0;
    bottom: 0;
    right: 0;
    position: absolute;
    }
    .btn-danger1{
      width: 305px; 
      height: 117px;
    }
  </style>
<body >
<div class="lyear-layout-web" id="app" >
  <div class="lyear-layout-container">
    <!--左侧导航-->

    <!--End 左侧导航-->
    
    <!--头部信息-->
 
    <!--End 头部信息-->
  
    <!--页面主要内容-->
    <main  >
      <div class="container-fluid" >
        <div class="row">
          <div class="col-lg-12" v-loading="loading" element-loading-text="拼命加载中">
            <div class="card">
              <div class="card-toolbar clearfix">
                <div style="text-align:center">
                  <el-button  class="btn btn-danger1" type="warning" style="background-color:#00CC99; border-color:#00CC99;" @click="go('lyear_js_chartjs root.html')">{{user}}</br>用户数量</el-button>
                  <el-button  class="btn btn-danger1" type="warning" style="background-color:#3ee692; border-color:#3ee692;" @click="go('lyear_js_chartjs all.html')">{{role}}</br>角色数量</el-button>
                  <el-button  class="btn btn-danger1" type="warning" style="background-color:#68e8f9; border-color:#68e8f9;" @click="go('lyear_js_chartjs log.html')">{{log}}</br>日志数量</el-button>
                  <el-button  class="btn btn-danger1" type="warning" style="background-color:#68c4f9; border-color:#68c4f9;" @click="go('lyear_js_chartjs parameters.html')">{{param}}</br>参数管理</el-button>
                  <el-button  class="btn btn-danger1" type="warning" style="background-color:#68eff9; border-color:#68eff9;" @click="go('lyear_js_chartjs unit.html')">{{organ}}</br>单位管理</el-button>
                </div>
              </div>
              
              <div class="card-body1" >
                  <iframe style="width: 100%; height: 100%; border:0px;" name="right" id="right" src="lyear_js_chartjs time.html"></iframe>  
              </div>
            </div>
          </div>
          
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script src="https://cdn.bootcss.com/vue/2.6.9/vue.min.js"></script>
<script src="https://cdn.bootcss.com/axios/0.19.0/axios.min.js"></script>

<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>

<script>

  new Vue({
    el:"#app",
  data:{
    list:[],
    role:[],
    user:[],
    log:[],
    param:[],
    organ:[],
    loading: false,
  },
  created () {
    this.getlist();
  },
  methods: {
    go(path){
      $("iframe").attr("src",path);
    },
    getlist(){
      this.loading = true;
      setTimeout(() => {
      this.loading = false;

       axios.get("http://29n01o8660.oicp.vip/server/rolecount")
       .then(res => {
         this.role = res.data[0].count
        //  alert(JSON.stringify(this.role))
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/usercount")
       .then(res => {
         this.user = res.data[0].count
        //  alert(JSON.stringify(this.role))
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/logcount")
       .then(res => {
         this.log = res.data[0].count
        //  alert(JSON.stringify(this.role))
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/organcount")
       .then(res => {
         this.organ = res.data[0].count
        //  alert(JSON.stringify(this.role))
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/paramcount")
       .then(res => {
         this.param = res.data[0].count
        //  alert(JSON.stringify(this.role))
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })

      }, 2000);
    },
  
  }
  })
</script>
</body>
</html>